package com.jianyun.jyzs.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * Created by mlli on 2017/11/9.
 */

public class TradeDetailAdapter extends FragmentStatePagerAdapter {
    List<Fragment> fragmentList;

    public TradeDetailAdapter(FragmentManager var1, List<Fragment> var2) {
        super(var1);
        this.fragmentList = var2;
    }

    public void setFragmentList(List<Fragment> fragmentList) {
        this.fragmentList = fragmentList;
        notifyDataSetChanged();
    }

    public Fragment getItem(int var1) {
        return this.fragmentList != null && this.fragmentList.size() > 0?(Fragment)this.fragmentList.get(var1):null;
    }

    public int getCount() {
        return this.fragmentList != null && this.fragmentList.size() > 0?this.fragmentList.size():0;
    }

    @Override
    public int getItemPosition(Object object) {
        return POSITION_NONE;
    }
}